package dcutils.cards.standard;

// Import JDK Classes
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;

/**
 * Represents all the ranks in the standard deck of playing cards.
 * @author dca
 */
public enum Rank implements Iterable<Rank> {
	ACE("ace"),
	DEUCE("deuce"),
	THREE("three"),
	FOUR("four"),
	FIVE("five"),
	SIX("six"),
	SEVEN("seven"),
	EIGHT("eight"),
	NINE("nine"),
	TEN("ten"),
	JACK("jack"),
	QUEEN("queen"),
	KING("king");

	private String name;

	private Rank(String name) {
		this.name = name;
	} // END constructor

	public String getName() {
		return this.name;
	} // END getName

	public static Rank[] asArray() {
		return values();
	} // END asArray

	public static List<Rank> asList() {
		return Arrays.asList(asArray());
	} // END asList

	@Override
	public Iterator<Rank> iterator() {
		return asList().iterator();
	} // END iterator

	@Override
	public String toString() {
		return getName();
	} // END toString
} // END enum Rank
